package advanced.thread;


/**
 * 创建线程方式2
 * <p>
 * <p>
 * <p>
 * <p>
 * 实现Runnable接口, 避开Java 的单继承局限性
 */
public class L_Runnable implements Runnable {
    public static void main(String[] args) {
        new Thread(new L_Runnable()).start();
        for (int i = 0; i < 50; i++) {
            System.out.println(i);
        }
    }

    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            System.out.println("一遍coding");
        }
    }
}
